/*
 * @Author: ReinerLau lk850593913@gmail.com
 * @Date: 2022-10-20 10:55:04
 * @LastEditors: ReinerLau lk850593913@gmail.com
 * @LastEditTime: 2022-11-17 14:22:29
 * @FilePath: \v2.0.0\src\api\inspection\robot-list.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

export const archives = {
  getRobotAndCompany(params) {
    return request({
      url: "/robot-archives/v1/getRobotAndCompany",
      method: "get",
      params,
    });
  },
};

export function robotAlignPosition(data) {
  return request({
    url: "/robot-cruise/calibrationV2",
    method: "post",
    data,
  });
}

export function robotFaultInfo(code) {
  return request({
    url: "/robot-inspection-log/v1/faultInfo/" + code,
    method: "get",
  });
}

export function realTimeLocation(tid, code) {
  return request({
    url: `/robot-log/v1/realTimeLocation/${tid}/${code}`,
    method: "get",
  });
}

/**
 * @description: 获取室内安保机器人
 * @param {*} params
 * @return {*}
 */
export function getInsideRobot(params) {
  return request({
    url: "/robot-archives/v1/getRobotAndCompany",
    method: "get",
    params: {
      RType: "inspection",
      ...params,
    },
  });
}
